﻿package Modules
{
	import Modules.CommunicationsModule.Session;
	import Modules.MouseCursorModule.Tool;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.LoaderInfo;
	import flash.display.MovieClip;
	import flash.text.TextField;

	public class MainTimeLine
	{
		//Flash Variables
		public static var stageWidth:Number = 760;
		public static var stageHeight:Number = 600;
		public static var root:Object;
		public static var mainMC:Object;
		public static var loaderInfo:LoaderInfo;
		public static var rootURL:String = "http://ft.nus-hci.com/";
		
		//Session Reference variables
		public static var session:Session;
		
		//timing variables
		public static var serverTime:int = 0;
		
		//Initial load booleans
		public static var loadedInventory:int = 0;		
		public static var loadedPlayer:Boolean = false;
		public static var loadedFarm:Boolean = false;
		public static var loadedPlayerInventory:Boolean = false;
		public static var loadedVolunteerEvents:Boolean = false;
		public static var loadedParty:Boolean = false;
		public static var loadedBulletinFAQ:Boolean = false;
		public static var loadedPlayerActivityJoin:Boolean = false;
		public static var loadedAchievement:Boolean = false;
		public static var loadedQuest:Boolean = false;
		
		//public static var loadedOrientationEvents:Boolean = false;
		//public static var calendarBuilt:Boolean = false;
		
		//In game debugger
		public static var debugText:TextField;
		
		//Reference variables for farm
		public static var activeFarm:MovieClip;
		public static var farmBack:MovieClip;
		public static var smallgrid:Bitmap;
		public static var biggrid:Bitmap;
		public static var farmcontainer:MovieClip;
		public static var gridBounds:BitmapData;
		public static var farmObjects:Array = [];
		public static var numFarmObjects:int = 0;
		public static var farmRollOver:Boolean = false;
		
		//Time that soil stays wet
		public static var soilWetTime:Number = 28800;
		
		//Time that crop stays alive after soil dries up
		public static var drySoilTolerance:Number = 7200;
		
		//Growth percentages
		public static var seedPercent:Number = 0.25; //25% of growth time will be spent as seeds
		public static var saplingPercent:Number = 1; //75% of growth time will be spent as saplings
		
		//Reference Variables for mouse tool
		public static var activeMouseTool:Tool = new Tool();
		
		public static var friendPanel:MovieClip;
		public static var friends:Array;
		
		//Reference Variables for redecoration
		public static var cropDecoHUD:MovieClip;
		public static var decoHUD:MovieClip;
		public static var redecorate:Boolean = true;
		public static var storeObject:Function;
		public static var sellObject:Function;
		public static var removeObject:Function;
		public static var moveObject:Function;	
		public static var redecorateFunc:Function;
		
		//Mouse Tool Reference Functions
		public static var plantSeedFunction:Function;
		public static var buildFunction:Function;
		public static var decoFunction:Function;
		public static var multiToolFunction:Function;
	}
}